package com.siwei.mes.controller.laboratory;


import com.siwei.mes.common.annotation.AnonymousAccess;
import com.siwei.mes.common.result.Json;
import com.siwei.mes.service.laboratory.MockSyncDataService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 模拟同步所有到协会
 *
 * @Description: 模拟同步所有到协会
 * @Version: 1.0
 * @author: mlchen
 * @date: 2024/11/4 09:13
 */
@RestController
@RequestMapping("mockSyncData")
public class MockSyncDataController {
    @Resource
    private MockSyncDataService mockSyncDataService;

    @AnonymousAccess
    @PostMapping("syncCustomer")
    public Json syncCustomer() {
        String msg = mockSyncDataService.syncCustomer();
        return Json.succ().msg(msg);
    }

    @AnonymousAccess
    @PostMapping("syncProject")
    public Json syncProject() {
        String msg = mockSyncDataService.syncProject();
        return Json.succ().msg(msg);
    }

    @AnonymousAccess
    @PostMapping("syncRwdextra")
    public Json syncRwdextra() {
        String msg = mockSyncDataService.syncRwdextra();
        return Json.succ().msg(msg);
    }
}
